<template>
  <div>
    <model-display :list-api="listApi" :fields="fields" :funcs="funcs"></model-display>

  </div>
</template>

<script>
import * as appname from "../../api/appname/appname";

export default {
  name: "Appname",
  data() {
    return {
      listApi: appname.listappname,
      fields: [
        { prop: "id", label: "ID", show: false, unique: true, required: false },
        { prop: "name", label: "项目名称", show: true, search: true, form: true, required: true },
        { prop: "code", label: "项目编码", show: true, search: true, form: true, required: true },
        { prop: "person", label: "项目负责人", show: true, search: true, sortable: true, type: "users", form: true, required: true },
        { prop: "dept", label: "部门", show: true, search: true, type: "depts", form: true, required: true },
        { prop: "create_datetime", label: "创建时间", show: true, search: true, type: "date" },
        { prop: "creator_name", label: "创建者", show: true, search: false },
        { prop: "description", label: "描述", show: true, search: false, form: true }
      ],
      funcs: [
        { type: "add", label: "新增", permis: ["appname:appname:post"], "icon": "el-icon-plus", api: appname.addappname },
        { type: "update", label: "修改", permis: ["appname:appname:{id}:put"], api: appname.updateappname },
        { type: "delete", label: "删除", permis: ["appname:appname:{id}:delete"], api: appname.delappname },
        { type: "export", label: "导出", permis: ["appname:appname:export:get"], api: appname.exportappname },
        { type: "import", label: "导入", permis: ["appname:appname:importTemplate:get", "appname:appname:importTemplate:post"], api: appname.importsappname, template_api: appname.importTemplate },
        { type: "select", label: "详情", permis: ["appname:appname:get"], api: appname.getappname }
      ]
    };
  },
  created() {
  },
  mounted() {
  },
  methods: {
  }

};
</script>
